Skip to content

feat: Replace fixed-width box output with status spine format#65

Merged
konard merged 8 commits intomainfrom
issue-64-531bd4a9716c
Jan 8, 2026
Merged

feat: Replace fixed-width box output with status spine format#65
konard merged 8 commits intomainfrom
issue-64-531bd4a9716c

Conversation

@konard
Copy link
Member

@konard konard commented Jan 8, 2026

Summary

This PR replaces the fixed-width box output format with a new "status spine" format that is:

  • Width-independent: No truncation, no jagged boxes
  • Lossless: All data visible and copy-pasteable
  • Portable: Works in TTY, tmux, SSH, CI, and log files
  • Clear: Visual distinction between metadata (│), command ($), and program output (no prefix)

Before (box format - REMOVED)

╭────────────────────────────────────────────────────────╮
│ Session ID: abc-123-def-456-ghi                        │
│ Starting at 2025-01-01 00:00:00: echo hello            │
│ [Isolation] Environment: docker, Mode: attached        │
╰────────────────────────────────────────────────────────╯

After (status spine format - ONLY FORMAT)

│ session   abc-123-def-456-ghi
│ start     2025-01-01 00:00:00
│
│ isolation docker
│ mode      attached
│ image     ubuntu:latest
│ container docker-123
│
$ echo hello

hello world

✓
│ finish    2025-01-01 00:00:01
│ duration  0.500s
│ exit      0
│
│ isolation docker
│ mode      attached
│ image     ubuntu:latest
│ container docker-123
│
│ log       /tmp/start-command-123456.log
│ session   abc-123-def-456-ghi

Key Changes

JavaScript

  • Updated js/src/lib/output-blocks.js with spine format functions only:
    • createSpineLine() - Creates metadata lines with prefix
    • createEmptySpineLine() - Creates empty spine separator
    • createCommandLine() - Creates command line with $ prefix
    • getResultMarker() - Returns or based on exit code
    • parseIsolationMetadata() - Parses isolation info from extraLines
    • generateIsolationLines() - Generates spine-formatted isolation metadata
  • Removed all legacy BOX_STYLES, getBoxStyle(), and related box-drawing functions
  • Updated createStartBlock() and createFinishBlock() to use spine format
  • Updated formatDuration() to append 's' suffix (e.g., "0.500s")

Rust

  • Updated rust/src/lib/output_blocks.rs with equivalent spine format functions
  • Added IsolationMetadata struct for parsed metadata
  • Removed all legacy BoxStyle, get_box_style(), and box-drawing functions
  • Updated both block functions to use new format

Tests

  • Updated js/test/output-blocks.test.js with tests for spine format only
  • Updated js/test/echo-integration.test.js to verify spine format only (no backward compat)
  • Updated js/test/ssh-integration.test.js to verify spine format only
  • Updated rust/tests/output_blocks_test.rs with equivalent Rust tests
  • All tests pass for both JavaScript and Rust

CI/CD Improvements

  • Install screen and tmux in GitHub Actions for Linux and macOS
  • Added explicit integration tests for screen, tmux, and docker isolation modes
  • Rust build job now only runs on push to main, not on PRs (tests already verify builds)

Test Plan

  • Run bun test - All JS tests pass
  • Run cargo test - All Rust tests pass
  • Run bun run lint - Linting passes
  • Run cargo clippy - No warnings
  • Run cargo fmt --check - Formatting passes
  • CI includes screen/tmux/docker isolation tests

Closes #64

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #64
@konard konard self-assigned this Jan 8, 2026
Changes the CLI output from fixed-width boxes to a "status spine" format:

Before (box format):
╭────────────────────────────────────────────────────────╮
│ Session ID: abc-123                                    │
│ Starting at 2025-01-01 00:00:00: echo hello            │
╰────────────────────────────────────────────────────────╯

After (status spine format):
│ session   abc-123
│ start     2025-01-01 00:00:00
│
$ echo hello

Benefits:
- Width-independent: no truncation, no jagged boxes
- Lossless: all data visible and copy-pasteable
- Works in TTY, tmux, SSH, CI, and log files
- Clear visual distinction between metadata (│), command ($), and output

Key changes:
- JavaScript: Updated output-blocks.js with createSpineLine,
  parseIsolationMetadata, and generateIsolationLines
- Rust: Updated output_blocks.rs with equivalent spine format functions
- Tests: Updated both JS and Rust tests for new format
- Backward compatible: Legacy BOX_STYLES kept for reference

Closes #64

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] Redesign CLI output to width-independent “status spine” format (lossless, ordered footer with isolation repetition) feat: Replace fixed-width box output with status spine format Jan 8, 2026
konard and others added 2 commits January 8, 2026 01:52
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The tests now accept both the old box format ([Isolation] Environment: X)
and the new spine format (│ isolation X) for isolation metadata checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 8, 2026 01:01
@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $12.703088 USD
  • Calculated by Anthropic: $9.473313 USD
  • Difference: $-3.229775 (-25.43%)
    📎 Log file uploaded as GitHub Gist (1933KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Jan 8, 2026

We can install screen, tmux, docker in GitHub Actions (if not installed already) and make sure we do really test them all. It is cheap, and will make sure our CLI tool will work the same way on all platforms.

Also make sure we do drop support for previous bordered fixed width blocks like at all. We should support only new output format with spine | and $ and and .

Ensure all changes are correct, consistent and fully meet the requirements in both JS and Rust versions.

Also, do we really need to execute https://github.com/link-foundation/start/actions/runs/20801811382/job/59748219113?pr=65 for pull requests? Are tests not enough for rust? May be we should update our CI/CD?

@konard konard marked this pull request as draft January 8, 2026 01:05
@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-08T01:05:46.842Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

This commit drops support for the deprecated bordered fixed-width box
output format and requires only the new status spine format with:
- `│` prefix for metadata
- `$` for commands
- `✓` and `✗` for result markers

Changes:
- Remove BOX_STYLES, getBoxStyle(), and related legacy functions from
  both JS and Rust implementations
- Update all tests to verify spine format only
- Update CI/CD to install screen and tmux for integration tests
- Add explicit screen, tmux, and docker isolation tests in CI
- Skip Rust build job for PRs (tests already verify code builds)

This simplifies the codebase and ensures consistent output format
across all platforms and terminals.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 8, 2026 01:16
@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $7.839388 USD
  • Calculated by Anthropic: $5.623345 USD
  • Difference: $-2.216043 (-28.27%)
    📎 Log file uploaded as GitHub Gist (1377KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Jan 8, 2026

All tests on all platforms should pass. Find root causes and fix them all.

@konard konard marked this pull request as draft January 8, 2026 01:47
@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-08T01:47:35.413Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

- Use detached mode (-d) for docker CI test to avoid TTY requirement
- Update echo-integration tests to check for session name instead of
  reattach instructions (spine format doesn't include these)
- Fix linting errors in test assertions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 8, 2026 01:55
@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $3.315726 USD
  • Calculated by Anthropic: $2.149333 USD
  • Difference: $-1.166393 (-35.18%)
    📎 Log file uploaded as GitHub Gist (658KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Member Author

konard commented Jan 8, 2026

Looks like we need to update our changeset check for Rust at: https://github.com/link-foundation/start/actions/runs/20802747294/job/59750799581?pr=65

At the moment it didn't check for absense of changeset and just passed it should be fixed.

If https://github.com/link-foundation/rust-ai-driven-development-pipeline-template has the same issue file issue there.

@konard konard marked this pull request as draft January 8, 2026 02:18
@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-01-08T02:18:15.928Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait working session to finish, and provide your feedback.

- Add changelog fragment 64.md for spine format changes in Rust
- Fix changelog check to validate fragments added in PR diff, not just existing ones
- The previous check incorrectly passed when old fragments existed even if no new fragment was added for the current PR

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 8, 2026 02:25
@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 Solution Draft Log

Summary of changes in this session:

  1. Added Rust changelog fragment () for the spine format changes

  2. Fixed Rust changelog check validation - The previous check incorrectly passed when ANY changelog fragments existed in the directory, even if none were added in the current PR. Now it properly validates that a changelog fragment was added in the PR diff itself.

  3. Filed issue in template repo - Created link-foundation/rust-ai-driven-development-pipeline-template#13 to report the same changelog check bug there.

Verification:

  • ✅ All local tests pass (JS and Rust)
  • ✅ Linting passes for both JS and Rust
  • ✅ Legacy box format completely removed from JS and Rust
  • ✅ Spine format implemented consistently in both JS and Rust
  • ✅ All CI checks passing on all platforms

Changes confirmed:

  • Box-drawn UI removed
  • Status spine format with prefix for metadata, $ for command
  • Result markers and for success/failure
  • Isolation metadata repeated in footer
  • log and session always last in footer
  • screen/tmux/docker isolation tests added to CI

Working session complete. PR is ready for review.

@konard
Copy link
Member Author

konard commented Jan 8, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $4.452664 USD
  • Calculated by Anthropic: $2.510358 USD
  • Difference: $-1.942306 (-43.62%)
    📎 Log file uploaded as GitHub Gist (556KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard konard merged commit 28b15b5 into main Jan 8, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redesign CLI output to width-independent “status spine” format (lossless, ordered footer with isolation repetition)

1 participant